package io.github.lee.app.unsplash.ui.search.history

import android.content.Context
import android.view.LayoutInflater
import android.view.ViewGroup
import io.github.lee.app.unsplash.databinding.ItemSearchHistoryBinding
import io.github.lee.app.unsplash.repository.domain.SearchKeyword
import io.github.lee.core.ui.adapter.DataBindingAdapter

class SearchHistoryAdapter : DataBindingAdapter<SearchKeyword, ItemSearchHistoryBinding>() {
    override fun onCreateDataBinding(
        context: Context,
        inflater: LayoutInflater,
        parent: ViewGroup,
        viewType: Int
    ): ItemSearchHistoryBinding =
        ItemSearchHistoryBinding.inflate(inflater, parent, false)

    override fun onItemHolder(binding: ItemSearchHistoryBinding, item: SearchKeyword) {
        binding.item = item
    }

}